package com.cloudeoffice.server.service;

import com.cloudeoffice.server.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudeoffice.server.vo.RespBean;
import com.cloudeoffice.server.pojo.Role;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liujingnu
 * @since 2022-03-15
 */
public interface IAdminService extends IService<Admin> {

    RespBean login(String username, String password, String code,HttpServletRequest request);

    Admin getAdminByUserName(String username);
    List<Role> getRoles(Integer adminId);
    //获取所有操作员
    List<Admin> getAllAdmins(String keywords);
    //跟新操作员
    RespBean updateAdminRole(Integer adminId, Integer[] rids);
    //更新用户密码
    RespBean updatePassword(String oldPass,String pass,Integer adminId);
    //更新用户头像
    RespBean updateAdminUserFace(String url, Integer id, Authentication authentication);
}
